import { createRouter,createWebHistory } from "vue-router";

import Login from '@/components/Login.vue'
import Register from "@/components/Signin.vue"
import Home from '@/views/Home.vue'
import Science from '@/views/Health science.vue'
import Mental from '@/views/Mental health.vue'
import Telemedicine from '@/views/Telemedicine.vue'
import Plans from '@/views/Plans.vue'
import Community from '@/views/Community.vue'
import component from "element-plus/es/components/tree-select/src/tree-select-option.mjs";


const router = createRouter({
    history:createWebHistory(),
    routes: [
        {
        path:'/login',
        component:Login,
        },
        {
            path:'/register',
            component:Register,
        },
        {
            path:'/',
            redirect:'/home', //默认显示
        },
        
        {
            path:'/home',
            component:Home
        },
        {
            path:'/science',
            component:Science
        },
        {
            path:'/mental',
            component:Mental
        },
        {
            path:'/telemedicine',
            component:Telemedicine
        },
        {
            path:'/plans',
            component:Plans
        },
        {
            path:'/community',
            component:Community
        }
    ]
})

export default router